package net.htjs.jdkgrammer.jdk19;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class PlatformThreadTest {

    public static void main(String[] args) throws InterruptedException {
        //创建任务
        Runnable task = () -> {
            System.out.println(Thread.currentThread().getName());
        };

        //链式编程
        Thread.ofPlatform().name("平台线程").priority(Thread.MAX_PRIORITY).daemon(true).start(task).join();

    }
}
